<%@ taglib uri="http://www.groupwareworkbench.org.br/widgets/commons" prefix="Widgets" %>
<%@ taglib uri="http://www.groupwareworkbench.org.br/widgets/tag" prefix="TagMgr" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="cache-control" content="no-cache">
        <title>Not&iacute;cias</title>
        <link href="${pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/listagem.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
        <TagMgr:ScriptTags />
    </head>
    <body>
        <Widgets:Topo collabletInstance="${newsMgr}" />
        <Widgets:ConteudoPagina titulo="News:">
            <br />
            <h1><span class="style1">Cadastro</span></h1>
            <br />
            <%-- TODO: Tableless! --%>
            <form name="dados" method="post" action="<c:url value="/groupware-workbench/${newsMgr.id}/news" /> ">
                <input type="hidden" name="news.id" value="<c:out value="${news.id}" />" />
                <table cellpadding="3">
                    <tr>
                        <td>T&iacute;tulo</td>
                        <td><input size="60" type="text" name="news.title" value="<c:out value="${news.title}" />" /></td>
                    </tr>
                    <tr>
                        <td>Subt&iacute;tulo</td>
                        <td><input size="60" type="text" name="news.subTitle" value="<c:out value="${news.subTitle}" />" /></td>
                    </tr>
                    <tr>
                        <td>Conte&uacute;do</td>
                        <td><textarea rows="4" cols="60" name="news.body"><c:out value="${news.body}" /></textarea></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <c:if test="${tagMgr != null}">
                                Tags clique em uma das tags abaixo para adicion&aacute;-la à notícia.
                                <br />
                                <TagMgr:SelectTags tagMgr="${tagMgr}" />
                                <TagMgr:SetTags tagMgr="${tagMgr}" idObject="${news.id}" />
                            </c:if>
                        </td>
                    </tr>
                    <!-- tr>
                        <td colspan="2">
                            <c:if test="${recommendMgr != null}">
                                <recommendMgr:SimpleList genericEntity="${news}" recommendMgr="${recommendMgr}" />
                            </c:if>
                        </td>
                    </tr-->
                    <tr>
                        <td colspan="2" align="center" valign="middle">
                            <input type="submit" class="botao" value="Ok" />
                        </td>
                    </tr>
                </table>
                <br />
                <br />
                <br />
            </form>
            <div class="barra_botoes">
                <Widgets:Voltar collabletInstance="${newsMgr}" />
            </div>
        </Widgets:ConteudoPagina>
    </body>
</html>